<extend name="Layout/ins_page" />
<block name="content">
	{:W('PageHeader/new_search',array('name'=>$folder_name,'search'=>'M'))}
	<form method="post" name="form_adv_search" id="form_adv_search">
		<div class="adv_search panel panel-default 	<php> unset($_REQUEST['ty']);echo empty($_REQUEST) ? 'hidden' : '';</php>"  id="adv_search">
			<div class="panel-heading">
				<div class="row">
					<h4 class="col-xs-6">高级搜索</h4>
					<div class="col-xs-6 text-right">
						<a  class="btn btn-sm btn-info" onclick="submit_adv_search();">搜索</a>
						<a  class="btn btn-sm btn-info" href="{:U('statis','ty=all')}">重置</a>
					</div>
				</div>
				
			</div>
			<div class="panel-body">
				<div class="form-group col-sm-6">
					<label class="col-sm-4 control-label" for="name">标题：</label>
					<div class="col-sm-8">
						<input  class="form-control" type="text" id="name" name="name"  value="{$name}"/>
					</div>
				</div>
				<div class="form-group col-sm-6">
					<label class="col-sm-4 control-label" for="eq_user_name">发布人：</label>
					<div class="col-sm-8">
						<input  class="form-control" type="text" id="user_name" name="user_name" value="{$user_name}" />
					</div>
				</div>
				<div class="form-group col-sm-6">
					<label class="col-sm-4 control-label" for="create_time">创建时间：</label>
					<div class="col-sm-8">
						<div class="input-daterange input-group" >
							<input type="text" class="input-sm form-control text-center" name="be_create_time"  value="{$be_create_time}"/>
							<span class="input-group-addon">-</span>
							<input type="text" class="input-sm form-control text-center" name="en_create_time"  value="{$en_create_time}"/>
						</div>
					</div>
				</div>
			</div>
		</div>
	</form>
	<div class="space-8"></div>
	<notempty name="ty">
	<div class="operate panel panel-default">
		<div class="panel-body">
			
			<div class="pull-left">
				<ul class="nav nav-pills">
					
				
					<li <eq name="fid" value="no_finish">class="active"</eq>>
						<a href="{:U('folder','fid=no_finish')}">我未完成
						<notempty name="no_finish_task_count">
							<span class="badge badge-pink">{$no_finish_task_count}</span>
						</notempty></a>
					</li>
					<li <eq name="fid" value="dept">class="active"</eq>>
						<a href="{:U('folder','fid=dept')}">部门任务
						<notempty name="dept_task_count">
							<span class="badge badge-pink">{$dept_task_count}</span>
						</notempty></a>
					</li>
								
				</ul>
			</div>
			 
		</div>
	</div>
	</notempty>
	
	<div class="ul_table ul_table_responsive">
		<ul>
			<li class="thead">
				<span class="col-10">任务标题</span>
				<span class="col-8">发布人</span>
				<span class="col-10">总流程</span>
				<span class="col-10">产品数量</span>
				<span class="col-10">完成数量</span>
				<span class="col-10">子任务</span>
				<span class="col-10">发布时间</span>
			    <notempty  name="ty">
			    	<if condition="$ty eq 'all'">
					<span class="col-6">操作</span>
					</if>
				</notempty >
			</li>
			<empty name="list">
				<li class="no-data">
					没找到数据
				</li>
				<else/>
				<foreach name="list" item="vo">
					<li class="tbody">
						<span class="col-10">{$vo.task_parent_name}</span>
						<span class="col-8">{$vo.user_name}</span>
						<span class="col-10">{$vo.total_process}</span>
						<span class="col-10">{$vo.total_product}</span>
						<span class="col-10">{$vo.finish_product}</span>
						<span class="col-10">
							<a href="{:U('see','pid='.$vo['id'])}">查看</a>
						</span>
						<span class="col-10">{$vo.create_at}</span>
						<notempty  name="ty">
			    			<if condition="$ty eq 'all'">
								<span class="col-10 col-sm-end">
									<if condition="($vo.user_id eq $user_id)">
										<a href="{:U('delTaskParent','id='.$vo['id'])}" >删除</a>
									</if>
								</span>
							</if>
						</notempty> 
					</li>
				</foreach>
				<div class="pagination">
					{$page}
				</div>
			</empty>
		</ul>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		$(document).ready(function() {
			set_return_url();
		});
		
		
	</script>
</block>
